#ifndef AUDIOENCODETASK_H
#define AUDIOENCODETASK_H

#include <ClientImpl/Receive_handler.h>
#include <Task_Base/Task_Base.h>
#include"voAAC.h"
#include"cmnMemory.h"
class AudioEncodeTask: public Task_Base ,public Receive_handler
{
public:
    AudioEncodeTask(Receive_handler*);

    ~AudioEncodeTask();
public:
    virtual int close();

    virtual bool receive_handler(char *data,int size);
protected:
    virtual int svc();//主动工作线程函数
private:

//    faacEncHandle (*pfaacEncOpen)(unsigned long sampleRate,
//                      unsigned int numChannels,
//                      unsigned long *inputSamples,
//                      unsigned long *maxOutputBytes);

    VO_AUDIO_CODECAPI			AudioAPI;
    VO_HANDLE					hCodec;

    Receive_handler *m_pHandler;

     void           *pSo_handler;

     FILE* outfile;

     int m_pack_num1;
     int m_pack_num2;
};

#endif // AUDIOENCODETASK_H
